﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CubicFWNet.Data.Models;
using CubicFWNet.Data.SystemManager;
using CubicFWNet.Data.ViewModal;

namespace CubicFWNet.Application.SystemManager
{
    public class TaskRemindApp
    {
        private TaskRemindRepository _taskRemindRepository;

        public TaskRemindApp()
        {
            _taskRemindRepository = new TaskRemindRepository();
        }

        /// <summary>
        /// 更新提醒数据
        /// </summary>
        /// <returns></returns>
        public bool UpdateAll()
        {
            return _taskRemindRepository.UpdateAll();
        }

        /// <summary>
        /// 获取全部提醒列表
        /// </summary>
        /// <returns></returns>
        public IEnumerable<TaskRemindView> GetRemindList()
        {
             return _taskRemindRepository.GetRemindList();
        }

        /// <summary>
        /// 获取某用户的提醒列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public List<TaskRemindView> GetRemindListByUser(Guid userId)
        {
            return _taskRemindRepository.GetRemindListByUser(userId);
        }
    }
}
